# Author:	gong_libin
# Date:		2016_06_26

CC ?= g++
CFLAGS ?= -g -Wall

GLB_ENV ?= $(shell pwd)/..
GLB_INC ?= $(GLB_ENV)/inc
GLB_SRC ?= $(GLB_ENV)/src
GLB_UTL ?= $(GLB_ENV)/util
GLB_TST ?= $(GLB_ENV)/test

GLB_PLIB ?= /usr/lib
GLB_PINC ?= /usr/include/GlbInc

GLB_RLIB ?= /usr/local/lib
GLB_RINC ?= /usr/local/include/hiredis

GLB_XINC ?= /usr/include/libxml2
GLB_XLIB ?= `xml2-config --cflags --libs`

GLB_OBJECTS =				\
	GlbRtbBase.o			\
	GlbRtbArea.o			\
	GlbRtbAdvs.o			\
	GlbRtbIdxs.o			\
	GlbRtbMems.o

all: $(GLB_OBJECTS)

$(GLB_OBJECTS): %.o: %.cpp
	$(CC) -c $(CFLAGS) -I$(GLB_INC) -I$(GLB_PINC) -I$(GLB_RINC) -I$(GLB_XINC) $< -o $@

clean:
	rm -rf $(GLB_OBJECTS)
